package ui.widget;

import java.awt.Dimension;

import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JTextField;

import ui.other.YPBorderFactory;

public class YPSearchInputPanel extends JPanel{
	private JTextField findInput;
	private JButton findButton;
	private Dimension size;
	public YPSearchInputPanel() {
		this(340,50);
		
	}
	public YPSearchInputPanel(int w,int h) {
		setOpaque(false);
		size = new Dimension(w,h);
		setPreferredSize(size);
		setMaximumSize(size);
		findInput = new JTextField();
		findButton = new SearchBtn();
		this.setLayout(null);
		findInput.setBounds(0, 12, w-40, h-20);
		findInput.setBorder(YPBorderFactory.getRightOpenBorder());
        findButton.setBounds(findInput.getBounds().x + findInput.getBounds().width, 12, h-15, h-20);
        add(findInput);
        add(findButton);
	}
	public JTextField getFindInput() {
		return findInput;
	}
	public void setFindInput(JTextField findInput) {
		this.findInput = findInput;
	}
	public JButton getFindButton() {
		return findButton;
	}
	public void setFindButton(JButton findButton) {
		this.findButton = findButton;
	}
	
}
